<?php 
 echo CHtml::beginForm(); ?>

    <input type="hidden" name="idfact" id="idfact" value="<?php echo $idfact; ?>">
    
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'factura-grid',
        'itemsCssClass'=>'table table-hover table-striped table-bordered table-condensed',
	'dataProvider'=>$dataProvider,
        'ajaxUpdate'=>false,
        'emptyText' => 'No se encontraron resultados.',
	'columns'=>array(
            array(
                  'id'=>'Seleccionar',
                  'class'=>'CCheckBoxColumn',
                  'selectableRows' => '20000',  
                  'value'=>'$data->id',  
               ),                
		'id',
		'fecha_prestacion',
		'debitado',
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
<?php
 echo CHtml::submitButton('Cargar Prestaciones a Factura',array('id'=>'bot_ok_asistencias','name'=>'bot_ok_asistencias','class'=>'btn btn-success'));
 echo CHtml::endForm();  ?>
<?php echo "sdasd"; ?>
<script type="text/javascript">
  $("#Seleccionar_all").click(function () {
    var thisCheck = $(this);
    if (thisCheck.is(':checked')){
          $("input[name='Seleccionar[]']").each(function() {  
               $("input[name='Seleccionar[]']").prop('checked', true);
           });
    }
  });
</script>